package com.net.xpay.core.domain;

import com.net.common.domain.VersionedDomain;
import com.net.xpay.core.enums.PayTransBatchStatus;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.time.LocalDateTime;

/**
 * 2020/4/29 14:54

 * 发起的交易批次
 */
@Getter
@Setter
@NoArgsConstructor
public class PayTransSummary extends VersionedDomain {
    @ApiModelProperty(notes = "用户id")
    private Long userId;

    @ApiModelProperty(notes = "支付宝账号id")
    private Long alipayUserId;

    @ApiModelProperty(notes = "支付宝账号")
    private String alipayNickName;

    @ApiModelProperty(notes = "注册手机号")
    private String mobile;

    @ApiModelProperty(notes = "合伙人id")
    private Long partnerId;

    @ApiModelProperty(notes = "是否是代转账")
    private Boolean otherTrans;

    @ApiModelProperty(notes = "转账执行人id")
    private Long executeUserId;

    @ApiModelProperty(notes = "转账执行人外部id")
    private String executeOuterId;

    @ApiModelProperty(notes = "转账执行人手机号")
    private String executeMobile;

    @ApiModelProperty(notes = "商户的批次号 必选 user.id + '-' + pay_trans_summary.id")
    private String outBatchNo;

    @ApiModelProperty(notes = "支付宝发起支付后返回的 支付宝批次订单号")
    private String batchTransId;

    @ApiModelProperty(notes = "payTransBatchId")
    private Long payTransBatchId;

    @ApiModelProperty(notes = "导入的商户的批次号 非必选")
    private String importBatchNo;

    @ApiModelProperty(notes = "服务费 分")
    private Long servicePrice;

    @ApiModelProperty(notes = "服务费单价 分")
    private Long serviceUnitPrice;

    @ApiModelProperty(notes = "批次总金额，单位为元，精确到小数点后两位，取值范围[0.01,9999999999999.99]  必选")
    private String totalTransAmount;

    @ApiModelProperty(notes = "批次总笔数 10 必选")
    private Long totalCount;

    @ApiModelProperty(notes = "成功金额 单位为元")
    private String successAmount;

    @ApiModelProperty(notes = "成功笔数")
    private Long successCount;

    @ApiModelProperty(notes = "失败金额")
    private String failedAmount;

    @ApiModelProperty(notes = "失败笔数")
    private Long failCount;

    @ApiModelProperty(notes = "业务产品码。不同产品值不同，具体值联系支付宝确认。 必选")
    private String productCode;

    @ApiModelProperty(notes = "业务场景。不同场景值不同，具体值联系支付宝确认。 必选")
    private String bizScene;

    @ApiModelProperty(notes = "转账标题，用于收银台展示标题 报销付款 必选")
    private String orderTitle;

    @ApiModelProperty(notes = "绝对超时时间，格式为 yyyy-MM-dd HH:mm 非必选")
    private String timeExpire;

    @ApiModelProperty(notes = "业务备注 非必选")
    private String remark;

    @ApiModelProperty("状态")
    private PayTransBatchStatus status;

    @ApiModelProperty(notes = "完成时间")
    private LocalDateTime endTime;

    public static PayTransSummary getInstance() {
        return new PayTransSummary();
    }
}
